
<template tag="以下文档内容为hycli自动生成">
  <div>
    <el-dialog
      v-model="conf.aaasf_visible"
      title="删除"  width="30%"  draggable
      :close-on-click-modal="false"  :before-close="hide_aaasf">
      <span>确认删除吗?</span>
      <template #footer>
        <span class="dialog-footer">
          <el-button @click="hide_aaasf" icon="close">取消</el-button>
          <el-button type="primary" @click="save_aaasf" icon="select">确定</el-button>
        </span>
      </template>
    </el-dialog>
  </div>
</template>

<script>
export default {
  data(){
    return{
      conf:{
          aaasf_visible:false, //删除
      },
      //删除
      form_aaasf:{ 
        id:"",
      },
    }
  },
  methods:{
     //--------------------删除---------------------------------
      //显示 删除 弹出框
      show_aaasf(fm){
         Object.assign(this.form_aaasf,fm)
         this.conf.aaasf_visible = true;
      },
      //隐藏 删除 弹出框
      hide_aaasf(){
        this.conf.aaasf_visible = false;
      },
      //保存 删除 弹出框数据
      save_aaasf(){
        let that = this
        this.$theia.http.post("/sso/system/menu/del",this.form_aaasf).then(res=>{
          that.conf.confirmVisible = false 
          that.$notify.success({title: '成功',message: '删除成功',duration:5000})
          that.$emit("onsaved")
          that.hide_aaasf()
       }).catch(err=>{
          that.conf.confirmVisible = false
          let code = err.response.status
          let msg= `删除失败(${code})`
          that.$notify.error({title: '失败',message:msg,duration:5000})
       })
    },
    //-----------------------------------------------------------
  },
}
</script>